package com.example.et.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.et.entity.Ban;
import com.example.et.entity.Mechanism;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

@Service
public interface BanMapper extends BaseMapper<Ban> {
    @Insert("insert into info_ban (id,gong_id,name) values(#{id},#{gongid},#{ban})")
    int InsertBan(@Param("id") int id, @Param("gongid") int gongid, @Param("ban") String ban);

    @Update("UPDATE info_ban set gong_id = #{gongid},name = #{ban} where id = #{id}")
    int UpdateBan(@Param("id") int id,@Param("gongid") int gongid,@Param("ban") String ban);

    @Delete("DELETE from info_ban where id =#{id}")
    int DeleteBan(@Param("id") int id);

}
